package com.wuyou.designPatterns.factory.factoryMethod;

import com.wuyou.designPatterns.factory.factoryMethod.framework.Factory;
import com.wuyou.designPatterns.factory.factoryMethod.idcard.IdCard;
import com.wuyou.designPatterns.factory.factoryMethod.idcard.IdCardFactory;


public class FactoryMethodMain {

    public static void main(String[] args) {
        Factory idCardFactory = new IdCardFactory();
        IdCard owner = (IdCard)idCardFactory.create("张宇航");
        owner.use();
        IdCard owner1 = (IdCard)idCardFactory.create("韦高凡");
        owner1.use();
        IdCard owner2 = (IdCard)idCardFactory.create("刘志勇");
        owner2.use();
    }
}
